package com.lyd.service.impl;

import com.lyd.domain.Emp;
import com.lyd.dto.EmpDto;
import com.lyd.mapper.EmpMapper;
import com.lyd.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class IEmpServiceImpl implements EmpService {

    @Autowired
    private EmpMapper empmapper;

    @Override
    public List<Emp> getAll() {
        return empmapper.getAll();
    }

    @Override
    public Emp getOneById(Long id) {
        return empmapper.getOneById(id);
    }

    @Override
    public void addOne(Emp emp) {
        empmapper.addOne(emp);
        return ;
    }

    @Override
    public void delById(Long id) {
        empmapper.delById(id);
        return;
    }

    @Override
    public void updById(EmpDto dto) {
        empmapper.updById(dto);
        return;
    }
}
